home *** CD-ROM | disk | FTP | other *** search
/ PC Home 109 / PC Home 109.iso / data1.cab / Program_Files / be001.dxr / 00009_squig8.ls < prev    next >
Encoding:
Text File  |  2001-03-02  |  7.1 KB  |  199 lines

  1. on squig8
  2.   set direction to random(8)
  3.   startTimer()
  4.   repeat while the timer < 30
  5.     if direction = 1 then
  6.       set nom to the name of member the memberNum of sprite 10
  7.       if (nom = "1nw") or "2nw" or "1e" or "2e" or "1s" or "2s" or "1w" or "2w" or "1ne" or "2ne" or "1se" or "2se" or "1sw" or "2sw" then
  8.         set nom to "1n"
  9.         set the memberNum of sprite 10 to the number of member nom
  10.       end if
  11.       repeat with n = random(10) down to 1
  12.         set the locV of sprite 10 to the locV of sprite 10 - 1
  13.         if nom = "1n" then
  14.           set nom to "2n"
  15.         else
  16.           if nom = "2n" then
  17.             set nom to "1n"
  18.           end if
  19.         end if
  20.         set the memberNum of sprite 10 to the number of member nom
  21.         updateStage()
  22.         if the locV of sprite 10 <= -27 then
  23.           set the locV of sprite 10 to 507
  24.         end if
  25.       end repeat
  26.     end if
  27.     if direction = 3 then
  28.       set nom to the name of member the memberNum of sprite 10
  29.       if (nom = "1nw") or "2nw" or "1n" or "2n" or "1s" or "2s" or "1w" or "2w" or "1ne" or "2ne" or "1se" or "2se" or "1sw" or "2sw" then
  30.         set nom to "1e"
  31.         set the memberNum of sprite 10 to the number of member nom
  32.       end if
  33.       repeat with n = random(10) down to 1
  34.         set the locH of sprite 10 to the locH of sprite 10 + 1
  35.         if nom = "1e" then
  36.           set nom to "2e"
  37.         else
  38.           if nom = "2e" then
  39.             set nom to "1e"
  40.           end if
  41.         end if
  42.         set the memberNum of sprite 10 to the number of member nom
  43.         updateStage()
  44.         if the locH of sprite 10 >= 667 then
  45.           set the locH of sprite 10 to -27
  46.         end if
  47.       end repeat
  48.     end if
  49.     if direction = 5 then
  50.       set nom to the name of member the memberNum of sprite 10
  51.       if (nom = "1nw") or "2nw" or "1n" or "2n" or "1e" or "2e" or "1w" or "2w" or "1ne" or "2ne" or "1se" or "2se" or "1sw" or "2sw" then
  52.         set nom to "1s"
  53.         set the memberNum of sprite 10 to the number of member nom
  54.       end if
  55.       repeat with n = random(10) down to 1
  56.         set the locV of sprite 10 to the locV of sprite 10 + 1
  57.         if nom = "1s" then
  58.           set nom to "2s"
  59.         else
  60.           if nom = "2s" then
  61.             set nom to "1s"
  62.           end if
  63.         end if
  64.         set the memberNum of sprite 10 to the number of member nom
  65.         updateStage()
  66.         if the locV of sprite 10 >= 507 then
  67.           set the locV of sprite 10 to -27
  68.         end if
  69.       end repeat
  70.     end if
  71.     if direction = 7 then
  72.       set nom to the name of member the memberNum of sprite 10
  73.       if (nom = "1nw") or "2nw" or "1n" or "2n" or "1e" or "2e" or "1s" or "2s" or "1ne" or "2ne" or "1se" or "2se" or "1sw" or "2sw" then
  74.         set nom to "1w"
  75.         set the memberNum of sprite 10 to the number of member nom
  76.       end if
  77.       repeat with n = random(10) down to 1
  78.         set the locH of sprite 10 to the locH of sprite 10 - 1
  79.         if nom = "1w" then
  80.           set nom to "2w"
  81.         else
  82.           if nom = "2w" then
  83.             set nom to "1w"
  84.           end if
  85.         end if
  86.         set the memberNum of sprite 10 to the number of member nom
  87.         updateStage()
  88.         if the locH of sprite 10 <= -27 then
  89.           set the locH of sprite 10 to 667
  90.         end if
  91.       end repeat
  92.     end if
  93.     if direction = 2 then
  94.       set nom to the name of member the memberNum of sprite 10
  95.       if (nom = "1nw") or "2nw" or "1n" or "2n" or "1e" or "2e" or "1s" or "2s" or "1w" or "2w" or "1se" or "2se" or "1sw" or "2sw" then
  96.         set nom to "1ne"
  97.         set the memberNum of sprite 10 to the number of member nom
  98.       end if
  99.       repeat with n = random(10) down to 1
  100.         set the locV of sprite 10 to the locV of sprite 10 - 1
  101.         set the locH of sprite 10 to the locH of sprite 10 + 1
  102.         if nom = "1ne" then
  103.           set nom to "2ne"
  104.         else
  105.           if nom = "2ne" then
  106.             set nom to "1ne"
  107.           end if
  108.         end if
  109.         set the memberNum of sprite 10 to the number of member nom
  110.         updateStage()
  111.         if the locH of sprite 10 >= 667 then
  112.           set the locH of sprite 10 to -27
  113.         end if
  114.         if the locV of sprite 10 <= -27 then
  115.           set the locV of sprite 10 to 507
  116.         end if
  117.       end repeat
  118.     end if
  119.     if direction = 4 then
  120.       set nom to the name of member the memberNum of sprite 10
  121.       if (nom = "1nw") or "2nw" or "1n" or "2n" or "1e" or "2e" or "1s" or "2s" or "1w" or "2w" or "1ne" or "2ne" or "1sw" or "2sw" then
  122.         set nom to "1se"
  123.         set the memberNum of sprite 10 to the number of member nom
  124.       end if
  125.       repeat with n = random(10) down to 1
  126.         set the locV of sprite 10 to the locV of sprite 10 + 1
  127.         set the locH of sprite 10 to the locH of sprite 10 + 1
  128.         if nom = "1se" then
  129.           set nom to "2se"
  130.         else
  131.           if nom = "2se" then
  132.             set nom to "1se"
  133.           end if
  134.         end if
  135.         set the memberNum of sprite 10 to the number of member nom
  136.         updateStage()
  137.         if the locH of sprite 10 >= 667 then
  138.           set the locH of sprite 10 to -27
  139.         end if
  140.         if the locV of sprite 10 >= 507 then
  141.           set the locV of sprite 10 to -27
  142.         end if
  143.       end repeat
  144.     end if
  145.     if direction = 6 then
  146.       set nom to the name of member the memberNum of sprite 10
  147.       if (nom = "1nw") or "2nw" or "1n" or "2n" or "1e" or "2e" or "1s" or "2s" or "1w" or "2w" or "1ne" or "2ne" or "1se" or "2se" then
  148.         set nom to "1sw"
  149.         set the memberNum of sprite 10 to the number of member nom
  150.       end if
  151.       repeat with n = random(10) down to 1
  152.         set the locV of sprite 10 to the locV of sprite 10 + 1
  153.         set the locH of sprite 10 to the locH of sprite 10 - 1
  154.         if nom = "1sw" then
  155.           set nom to "2sw"
  156.         else
  157.           if nom = "2sw" then
  158.             set nom to "1sw"
  159.           end if
  160.         end if
  161.         set the memberNum of sprite 10 to the number of member nom
  162.         updateStage()
  163.         if the locH of sprite 10 <= -27 then
  164.           set the locH of sprite 10 to 667
  165.         end if
  166.         if the locV of sprite 10 >= 507 then
  167.           set the locV of sprite 10 to -27
  168.         end if
  169.       end repeat
  170.     end if
  171.     if direction = 8 then
  172.       set nom to the name of member the memberNum of sprite 10
  173.       if (nom = "1sw") or "2sw" or "1n" or "2n" or "1e" or "2e" or "1s" or "2s" or "1w" or "2w" or "1ne" or "2ne" or "1se" or "2se" then
  174.         set nom to "1nw"
  175.         set the memberNum of sprite 10 to the number of member nom
  176.       end if
  177.       repeat with n = random(10) down to 1
  178.         set the locV of sprite 10 to the locV of sprite 10 - 1
  179.         set the locH of sprite 10 to the locH of sprite 10 - 1
  180.         if nom = "1nw" then
  181.           set nom to "2nw"
  182.         else
  183.           if nom = "2nw" then
  184.             set nom to "1nw"
  185.           end if
  186.         end if
  187.         set the memberNum of sprite 10 to the number of member nom
  188.         updateStage()
  189.         if the locH of sprite 10 <= -27 then
  190.           set the locH of sprite 10 to 667
  191.         end if
  192.         if the locV of sprite 10 <= -27 then
  193.           set the locV of sprite 10 to 507
  194.         end if
  195.       end repeat
  196.     end if
  197.   end repeat
  198. end
  199.